<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<title>项目管理工具</title>
<meta charset="gbk">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap.min.css">
<script src="bootstrap-3.3.7-dist/js/jquery.min.js"></script>
<script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>


<script type="text/javascript">
function lpass(){
	//获取用户名
	checkPass();
	

}

function checkPass(){
	var lpassword = document.getElementById("lpassword").value;
	var password = document.getElementById("password").value;
	var msg = document.getElementById("msg");
	var param="lpassword="+lpassword+"&password="+password;
	$.ajax({
		type : 'post',
		url : 'updateUserp.do',
		data : param,
		success : function(data) {
		
		var data= $.trim(data);
		if("true"==data){
	//		msg.innerHTML="原始密码正确";
	//		window.location.open("index.jsp");
	//		window.location.reload();
	        top.location.href="updateinfosuccess.jsp";
		}else{
			msg.innerHTML="原始密码错误";
		}
				      	
		

		},
		error : function() {
			alert("出错了！");
		}
	});
	
}



</script>
<style type="text/css">
body {
	margin: 0px;
	background: url(style/image/background/bangongshi1xh.jpg) no-repeat;
	background-size: 100% 100%;
	background-attachment: fixed;

}

.pj {
	
}

.projectlist {
	padding-top: 10px;
	margin: 5px;
	float: left;
	text-align: center;
	height: 200px;
	width: 200px;
	font-size: 20px;
}

.projectlist:hover {
	background-color: #EEEED1;
}
</style>
</head>
<body>

	<div class="container">
		<div class="row clearfix">
			<div class="col-md-12 column">
				<nav class="navbar navbar-default" role="navigation">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle" data-toggle="collapse"
							data-target="#bs-example-navbar-collapse-1">
							<span class="sr-only">Toggle navigation</span><span
								class="icon-bar"></span><span class="icon-bar"></span><span
								class="icon-bar"></span>
						</button>

					</div>

				<div class="collapse navbar-collapse"
						id="bs-example-navbar-collapse-1">
						<ul class="nav navbar-nav">

							<li class="dropdown"><a href="#" class="dropdown-toggle"
								data-toggle="dropdown">项目管理工具<strong class="caret"></strong></a>
								<ul class="dropdown-menu">

									<li class="divider"></li>
									<li><a>切换团队</a></li>
									<li class="divider">切换团队</li>
									<c:if test="${empty allTeam}">
									</c:if>
									<c:if test="${not empty allTeam}">
										<c:forEach var="team" items="${allTeam}">
											<c:if test="${team.teamid eq nowteamid}">
												<li><a href="gotoTeamDetail.do?teamid=${team.teamid}">${team.teamname}
														&nbsp; &nbsp;<span class="glyphicon glyphicon-ok"></span>
												</a></li>
											</c:if>
											<c:if test="${team.teamid  ne nowteamid}">
												<li><a href="gotoTeamDetail.do?teamid=${team.teamid}">${team.teamname}</a></li>
											</c:if>

										</c:forEach>
										<li class="divider">团队管理</li>
										<li><a href="gotoTeamList.do">团队管理</a></li>
									</c:if>

								</ul></li>
						</ul>

					<ul class="nav navbar-nav navbar-right">
							<li><a><img	 src="${currentUser.headimage}" width="27" height="27">
							</a></li>
							<li><a>HI!，${currentUser.userName}</a></li>
							<li class="dropdown"><a href="#" class="dropdown-toggle"
								data-toggle="dropdown"><span
									class="glyphicon glyphicon-bell"></span>${applyPartListSize}<strong
									class="caret"></strong></a>
								<ul class="dropdown-menu">
									<c:if test="${empty applyPartList}">

										<li><a href="gotoTeamDetail.do?teamid=${nowteamid}">暂时没有通知</a></li>
									</c:if>
									<c:if test="${not empty applyPartList}">
										<c:forEach var="applyUser" items="${applyPartList}">


											<li><a href="gotoTeamDetail.do?teamid=${nowteamid}">${applyUser.username}&nbsp;申请加入团队</a></li>

										</c:forEach>
										<li class="divider"></li>
										<li><a href="gotoTeamDetail.do?teamid=${nowteamid}">更多</a></li>
									</c:if>

								</ul></li>
							<li><a href="logout.do">注销</a></li>
						</ul>
					</div>

				</nav>
			</div>
		</div>





		<div class="row clearfix">
			<div class="col-md-3 column">
				<ul class="nav nav-stacked nav-tabs">
					<li ><a
						href="gotoTeamDetail.do?teamid=${nowteamid}">团队</a></li>
					</br>
					<li ><a href="gotoProjectList.do?teamid=${nowteamid}">项目</a></li>
					</br>
					<li class="active"><a href="gotoUserinfo.do?teamid=${nowteamid}">信息</a></li>

				</ul>
			</div>
			
	<div class="message" align="left">
		  <h4>修改个人信息</h4><br>
		  <form id="updateUsers" action="updateUsers.do">
		  <input type="text" name="userName" placeholder="请输入新用户名" style="width: 500px;"><br><br>
		  <a data-toggle="modal" data-target="#myModal3">修改密码</a><br><br>
		  <button type="submit"  class="btn btn-primary btn-large" >保存设置</button>
		  </form>
	</div>
</div> 
		<!-- 模态框（Modal） -->
   <div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
					修改密码
				</h4>
			</div>
			
			<div class="modal-body">
			<form action="" method="post"> 
			    <input type="password" name="lpassword" id="lpassword" placeholder="现有密码" style="width: 400px;" ><span id="msg"></span><br><br>
				<input type="password" name="password" id="password" placeholder="请输入新密码" style="width: 400px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br>
				<input type="button" name="submit" onclick="lpass()" value="提交"/>
			</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消
				</button>
				
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
		
</div>		
		
		
			
		
		
		
</div>				
		
	
		
		
		
		
		
		</body>
</html>	